class Topic {
  Date commitdate
  Date postdate
  Date lastmod
  boolean deleted
  Boolean notop
  boolean moderate
  boolean sticky

  int stat1
  int stat2
  int stat3
  int stat4

  transient stat

  def getStat() {
    return [stat1, stat2, stat3, stat4]
  }


  User user
  Group group

  String postip
  String title
  String url
  String linktext

  transient message

  def getMessage() {
    Message.read(this.id)
  }

  static mapping = {
    table 'topics'
    version false
    user column: 'userid'
    group column: 'groupid'
  }
  static constraints = {
    notop nullable: true
  }
}
